﻿using JetBrains.Annotations;
using Shared.Service.DataScopes.UserScopes;

namespace Shared.Service.DataScopes.UserPolicyScopes
{
    /// <summary>
    /// 
    /// </summary>
    public class UserPolicyDataScope : UserDataScope
    {
        /// <summary>
        /// 名称
        /// </summary>
        public string PolicyName { get; }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="dataScopeInfo"></param>
        public UserPolicyDataScope([NotNull] DataScopeInfo dataScopeInfo) : this(dataScopeInfo.ProviderKey, dataScopeInfo.Name,
            dataScopeInfo.ScopeType, dataScopeInfo.ScopeKeys)
        {

        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="policyName"></param>
        /// <param name="scopeType"></param>
        /// <param name="scopeKeys"></param>
        public UserPolicyDataScope([NotNull] string userId,
            string policyName, DataScopeType scopeType, params string[] scopeKeys) : base(userId, scopeType, scopeKeys)
        {
            PolicyName = policyName;
        }
    }
}
